<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
    <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../css/admin.css">
    <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
    <script type="text/javascript" src="../../js/jquery.min.js"></script>
    <script type="text/javascript" src="../../js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../js/easyui-lang-zh_CN.js" ></script>
    <script type="text/javascript" src="../../js/common.js"></script>
    <script type="text/javascript" src="../../js/course.js"></script>
</head>
<body>
<form id="updateCourse2" method="post" style="text-align: center;">
			<input type="hidden" name="id" id="courseId" />
            <div class="updateCourse first">
                <label>课程：</label>
                <input name="name" id="name2" class="easyui-validatebox" required="true">
            </div>
            <div class="updateCourse">
                <label>学分：</label>
                <input name="credit" id="credit2"  class="easyui-validatebox" data-options="validType:'checkFloat',required:true"/>
            </div>
</form>
<script type="text/javascript">
	$(function(){
		var row = $('#dg').datagrid('getSelected');
		if(row){
		   $('#name2').val(row.name);
		   $('#credit2').val(row.credit);
		   $('#courseId').val(row.id);
		}
	});	
	
	//扩展学分验证
	 (function($) {  
		    $.extend($.fn.validatebox.defaults.rules, {    
		        checkFloat: {  
		            validator: function(value, param) {  
		                return /^[0-9]+$/.test(value);  
		            },  
		            message: '请输入合法数字'  
		        }  
		    });  
		})(jQuery);  
</script>

<style type="text/css">
	.first{
		margin-top:30px;
	}
	.updateCourse{
		height:30px;
		line-height:30px;
	}
</style>
</body>
</html>